package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.pojo.Personal;

@Mapper
public interface PasswordMapper{
    @Select( "select count(*) from emp where id = #{id} and password = #{oldPassword}")
    Integer selectPassword(Personal personal);

    @Update("update emp set password = #{newPassword} where id = #{id}")
    void updatePassword(Personal personal);
}
